import type { ArmorsModel, ResultModel, PageResultModel } from '@/api/model/model'
import request from '@/utils/request'


export const queryArmorsPageApi = (pn: Number, pz: Number) => 
  request.get<any, PageResultModel>(`/armors/armorsList?pn=${pn}&pz=${pz}`)///api/armors/armorsList

//根据ID查询armor
export const queryArmorByIdApi = (id: number) => request.get<any, ResultModel>(`/armors/getArmorById/${id}`)

export const updateApi = (armor:ArmorsModel) => request.post<any, ResultModel>(`/armors/armorsAddOrUpdate`, armor)
export const addApi = (armor:ArmorsModel) => request.post<any, ResultModel>(`/armors/armorsAddOrUpdate`, armor)

export const deleteApi = (id: number) => request.delete<any, ResultModel>(`/armors/armorsDelById/${id}`)
export const batchDeleteApi = (ids: (number| undefined)[]) => request.post<any, ResultModel>(`/armors/armorsBatchDelById`,ids)